package com.bole.dao;

import com.bole.pojo.DicImgTypeDo;
import com.bole.pojo.TbCarImgDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface TbCarImgDao  extends JpaRepository<TbCarImgDo, Long> {
    @Transactional
    @Modifying
    @Query(value = "delete  from TbCarImgDo t where  t.id in (:idss) ")
    void deleteBatch(List<Long> idss);

    TbCarImgDo getCarImgById(Long carId);

    TbCarImgDo findByCarId(Long carId);
}
